// vue2: new Router()

import { createRouter, createWebHashHistory } from "vue-router";

// 1. 创建路由
// vue2: new Router()
const router = createRouter({
  // vue2 的路由模式写法
  // mode: 'hash'
  history: createWebHashHistory(),
  routes: [
    { path: "/", component: () => import("../views/Home.vue") },
    { path: "/login", component: () => import("../views/Login.vue") },
  ],
});

export default router;
